import { Action } from '@ngrx/store';
import { Quote } from '../domain/index';

export enum QuoteActionTypes {
    LOAD_SUCCESS = '[Quote] Quote Success',
    LOAD_FAIL = '[Quote] Quote Fail',
    LOAD = '[Quote] Load'
}

export class LoadAction implements Action {
    readonly type = QuoteActionTypes.LOAD;
    constructor(public payload: any) { }
}

export class LoadSuccess implements Action {
    readonly type = QuoteActionTypes.LOAD_SUCCESS;
    constructor(public payload: Quote) { }
}

export class LoadFial implements Action {
    readonly type = QuoteActionTypes.LOAD_FAIL;
    constructor(public payload: string) { }
}

export type QuoteActions =
    | LoadAction
    | LoadSuccess
    | LoadFial;
